31 #define LIBSPOTON_VERSION 0x000106 32 #define LIBSPOTON_VERSION_STR "0.1.6" 34 #ifdef LIBSPOTON_OS_WINDOWS 36 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 38 #pragma GCC diagnostic warning "-Wdeprecated-declarations" 43 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 45 #pragma GCC diagnostic warning "-Wdeprecated-declarations" 62 LIBSPOTON_ERROR_NONE = 0,
63 LIBSPOTON_ERROR_CALLOC,
64 LIBSPOTON_ERROR_GCRY_CALLOC,
65 LIBSPOTON_ERROR_GCRY_CALLOC_SECURE,
66 LIBSPOTON_ERROR_GCRY_CHECK_VERSION,
67 LIBSPOTON_ERROR_GCRY_CIPHER_ENCRYPT,
68 LIBSPOTON_ERROR_GCRY_CIPHER_GET_ALGO_BLKLEN,
69 LIBSPOTON_ERROR_GCRY_CIPHER_GET_ALGO_KEYLEN,
70 LIBSPOTON_ERROR_GCRY_CIPHER_MAP_NAME,
71 LIBSPOTON_ERROR_GCRY_CIPHER_OPEN,
72 LIBSPOTON_ERROR_GCRY_CIPHER_SETIV,
73 LIBSPOTON_ERROR_GCRY_CIPHER_SETKEY,
74 LIBSPOTON_ERROR_GCRY_CONTROL,
75 LIBSPOTON_ERROR_GCRY_KDF_DERIVE,
76 LIBSPOTON_ERROR_GCRY_MD_MAP_NAME,
77 LIBSPOTON_ERROR_INVALID_LENGTH,
78 LIBSPOTON_ERROR_INVALID_PARAMETER,
79 LIBSPOTON_ERROR_KERNEL_PROCESS_ALREADY_REGISTERED,
80 LIBSPOTON_ERROR_NOT_CONNECTED_TO_SQLITE_DATABASE,
81 LIBSPOTON_ERROR_NULL_LIBSPOTON_HANDLE,
82 LIBSPOTON_ERROR_NUMERIC_ERROR,
83 LIBSPOTON_ERROR_SQLITE_BIND_BLOB_CONTENT,
84 LIBSPOTON_ERROR_SQLITE_BIND_BLOB_DESCRIPTION,
85 LIBSPOTON_ERROR_SQLITE_BIND_BLOB_TITLE,
86 LIBSPOTON_ERROR_SQLITE_BIND_BLOB_URL,
87 LIBSPOTON_ERROR_SQLITE_BIND_INT,
88 LIBSPOTON_ERROR_SQLITE_BIND_INT64,
89 LIBSPOTON_ERROR_SQLITE_BIND_INT_ENCRYPT,
90 LIBSPOTON_ERROR_SQLITE_CREATE_KERNEL_REGISTRATION_TABLE,
91 LIBSPOTON_ERROR_SQLITE_CREATE_KERNEL_REGISTRATION_TRIGGER,
92 LIBSPOTON_ERROR_SQLITE_CREATE_URLS_TABLE,
93 LIBSPOTON_ERROR_SQLITE_DATABASE_LOCKED,
94 LIBSPOTON_ERROR_SQLITE_OPEN_V2,
95 LIBSPOTON_ERROR_SQLITE_PREPARE_V2,
96 LIBSPOTON_ERROR_SQLITE_STEP
98 libspoton_error_code_t;
103 int m_cipherAlgorithm;
105 sqlite3 *m_sqliteHandle;
108 typedef libspoton_error_code_t libspoton_error_t;
115 bool libspoton_is_kernel_registered(libspoton_handle_t *libspotonHandle,
116 libspoton_error_t *error);
122 const char *libspoton_strerror(
const libspoton_error_t error);
124 libspoton_error_t libspoton_create_urls_table
125 (libspoton_handle_t *libspotonHandle);
131 libspoton_error_t libspoton_delete_urls(libspoton_handle_t *libspotonHandle,
132 const int encrypted);
138 libspoton_error_t libspoton_deregister_kernel
139 (
const pid_t pid, libspoton_handle_t *libspotonHandle);
145 libspoton_error_t libspoton_init_a(
const char *databasePath,
146 const char *cipherType,
148 const size_t keyLength,
149 libspoton_handle_t *libspotonHandle,
150 const int secure_memory_pool_size);
151 libspoton_error_t libspoton_init_b(
const char *databasePath,
152 const char *cipherType,
153 const char *hashType,
154 const char *passphrase,
156 const size_t passphraseLength,
157 const size_t saltLength,
158 const unsigned long iterationCount,
159 libspoton_handle_t *libspotonHandle,
160 const int secure_memory_pool_size);
166 libspoton_error_t libspoton_register_kernel
168 const bool forceRegistration,
169 libspoton_handle_t *libspotonHandle);
179 libspoton_error_t libspoton_save_url(
const char *url,
180 const size_t urlSize,
182 const size_t titleSize,
183 const char *description,
184 const size_t descriptionSize,
186 const size_t contentSize,
187 libspoton_handle_t *libspotonHandle);
193 pid_t libspoton_registered_kernel_pid(libspoton_handle_t *libspotonHandle,
194 libspoton_error_t *error);
200 void libspoton_close(libspoton_handle_t *libspotonHandle);
201 void libspoton_enable_sqlite_cache(
void);
Definition: libspoton.h:100